Skip to main content

AccordionCollapsible

A common component to show content inside of a collapsible accordion.

NameTypeDefault ValueRequiredDescription
headerReactNodeYescomponent to display as header of accordion
expandedContentReactNodeYescomponent to display only when the accordion is expanded
testIDstringNotestID for the header
a11yHintstringNoa11yHint for the header
collapsedContentReactNodeNocomponent to display on when the accordion is collapsed
hideArrowbooleanNoif true hides the accordion arrow and only displays header & collapsed content
customOnPress(expandedValue?: boolean) => voidNocustom on press call if more action is needed when expanding/collapsing the accordion
expandedInitialValuebooleanNosets the initial value of expanded if an accordion should already be expanded on render
noBorderbooleanNogets rid of border of TextArea so the top and bottom borders don't double up in message threads when accordion is opened
headerRefRef<View>NoRef for the header section